﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using IndoReputation.Commons;

namespace IndoReputation.Models.BusinessObject
{
    public class Reporter : CommonEntity
    {
        /// <summary>
        /// Default Contructor
        /// </summary>
        public Reporter()
        { }

        [Required]
        public int ID
        {
            set;
            get;
        }

        [Required(ErrorMessage = "Please type the Name of Reporter")]
        [StringLength(256, ErrorMessage = "String may not be longer than 256 characters")]
        [PlaceHolder("Enter name here")]
        public string Name
        {
            set;
            get;
        }

        [StringLength(256, ErrorMessage = "String may not be longer than 256 characters")]
        [Display(Name = "Fields of his/her concerned")]
        [PlaceHolder("Enter Fields of his/her concerned here")]
        public string FieldsConcerned
        {
            set;
            get;
        }

        [StringLength(256, ErrorMessage = "String may not be longer than 256 characters")]
        [Display(Name = "Mobile")]
        [PlaceHolder("Enter mobile phone here")]
        public string Mobile
        {
            set;
            get;
        }

        [RegularExpression(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", ErrorMessage = "Please enter valid e-mail adress")]
        [DataType(DataType.EmailAddress)]
        [StringLength(256, ErrorMessage = "String may not be longer than 256 characters")]
        [Display(Name = "E-mail")]
        [PlaceHolder("Enter email here")]
        public string Email
        {
            set;
            get;
        }
        public DateTime? CreateAt
        {
            set;
            get;
        }
        public int? CreateBy
        {
            set;
            get;
        }
        public DateTime? UpdateAt
        {
            set;
            get;
        }
        public int? UpdateBy
        {
            set;
            get;
        }
    }
}